import { post } from '@/request/http'
import store from '@/store'

// 获取 账单管理  账单列表 查询数据
export const getBillService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/getBillManagrmentList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            chbFltId: store.state.user.FLT_UUID_DX_H,
            startTime: data.startDay || '',
            endTime: data.endDay,
            chbBillNo: data.billNum
          }
        },
        Orderbys: {},
        PageIndexs: {
          FTKJWLHYPT: data.PageIndexs
        },
        PageSizes: {
          FTKJWLHYPT: data.PageSizes
        }
      }
    }
  )

// 获取 账单管理  账单列表 查询数据
export const getBillStatusService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/getBillActivitiesList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            blaChbId: data.blaChbId
          }
        },
      }
    }
  )

// 获取 账单管理 财务收账
export const financialGetService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/addBillActivitiesModel',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            blaChbId: data.blaChbId,
            blaHandleType: data.blaHandleType,
            blaHandleUser: store.state.user.USR_CODE_DX_H,
          }
        },
      }
    }
  )

// 获取 账单管理 修改送账单为   退账处理
export const upDataBillService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/updateChargeBillActivities',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            blaChbId: data.blaChbId,
            blaHandleType: data.blaHandleType,
            blaHandleUser: store.state.user.USR_CODE_DX_H,
            blaBadcause: data.blaBadcause,
            chbPayerId: data.chbPayerId
          }
        },
      }
    }
  )
